package com.eastfair.venuebooking.dto;

import com.eastfair.venuebooking.demand.ContractManageGroup;
import com.eastfair.venuebooking.enumeration.BelongRecordOperateTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author dqq
 * @date 2022/6/10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
public class BelongToAssignDTO implements Serializable {


    @NotNull(message = "客户id不可为空", groups = {CustomerMainDTO.Assign.class})
    @NotNull(message = "线索id不可为空", groups = {SaleClueDTO.Assign.class})
    @NotNull(message = "商机id不可为空", groups = {BusinessOpportunityDTO.Assign.class})
    @NotNull(message = "合同id不可为空", groups = {ContractManageDTO.Assign.class})
    @ApiModelProperty(value = "客户id")
    private Long id;

    /**
     * 归属人员
     */
    @NotNull(message = "归属人员不可为空", groups = {CustomerMainDTO.Assign.class, SaleClueDTO.Assign.class,
            BusinessOpportunityDTO.Assign.class, ContractManageDTO.Assign.class})
    @ApiModelProperty(value = "归属人员")
    private Long belongTo;

    /**
     * 归属人员姓名
     */
    @NotBlank(message = "归属人员姓名不可为空", groups = {CustomerMainDTO.Assign.class, SaleClueDTO.Assign.class,
            BusinessOpportunityDTO.Assign.class, ContractManageDTO.Assign.class})
    @ApiModelProperty(value = "归属人员姓名")
    private String belongToName;

    /**
     * 前归属人员
     */
    @ApiModelProperty(value = "前归属人员")
    private Long lastBelongTo;

    /**
     * 前归属人员姓名
     */
    @ApiModelProperty(value = "前归属人员姓名")
    private String lastBelongToName;

    /**
     * 归属人员部门id
     */
    @NotNull(message = "归属部门不可为空", groups = {CustomerMainDTO.Assign.class, SaleClueDTO.Assign.class,
            BusinessOpportunityDTO.Assign.class, ContractManageDTO.Assign.class})
    @ApiModelProperty(value = "归属人员部门id")
    private Long orgCode;

    /**
     * 归属人员部门名称
     */
    @NotBlank(message = "归属部门名称不可为空", groups = {CustomerMainDTO.Assign.class, SaleClueDTO.Assign.class,
            BusinessOpportunityDTO.Assign.class, ContractManageDTO.Assign.class})
    @ApiModelProperty(value = "归属人员部门名称")
    private String orgName;

    /**
     * 前归属部门
     */
    @ApiModelProperty(value = "前归属部门")
    private Long lastOrgCode;

    /**
     * 前归属部门名称
     */
    @ApiModelProperty(value = "前归属部门名称")
    private String lastOrgName;

    /**
     * 备注信息
     */
    @ApiModelProperty(value = "备注信息")
    @Size(max = 1000, message = "备注长度不能超过1000", groups = {CustomerMainDTO.Assign.class, SaleClueDTO.Assign.class,
            BusinessOpportunityDTO.Assign.class, ContractManageDTO.Assign.class})
    private String remark;

    /**
     * 业务类型
     */
    @ApiModelProperty(value = "业务类型")
    private String businessType;

    /**
     * 操作方式
     */
    @ApiModelProperty(value = "操作方式")
    private BelongRecordOperateTypeEnum operateType;
}
